import request from '@/utils/request'
import {
	encrypt,
	decrypt
} from "@/utils/jsencrypt.js";

// 首页推荐房源列表
export function recommendList(query) {
	return request({
		url: '/app/mall/goods/list',
		method: 'get',
		params: query
	})
}
//获取我的定位附件的地标列表
export function landmarkList(query) {
	return request({
		url: '/app/mall/landmark/list',
		method: 'get',
		params: query
	})
}
//获取房屋来源类型列表
export function goodsSourceList(query) {
	return request({
		url: '/app/mall/goodsSource/list',
		method: 'get',
		params: query
	})
}
//获取房屋类型列表
export function goodsTypeList(query) {
	return request({
		url: '/app/mall/goodsType/list',
		method: 'get',
		params: query
	})
}

//获取区域列表
export function areaList(query) {
	return request({
		url: '/app/mall/area/list',
		method: 'get',
		params: query
	})
}
//批量取消收藏小区
export function cancelCollectBatch(data) {
	return request({
		url: '/app/mall/collect/goods/collect/cancelBatch',
		method: 'post',
		data: data
	})
}

// 房源属性
export function goodsAttrList(query) {
	return request({
		url: '/app/mall/goodsAttr/list',
		method: 'get',
		params: query
	})
}

// 基础实施
export function getGoodsFacilityList(query) {
	return request({
		url: '/app/mall/goodsFacility/list',
		method: 'get',
		params: query
	})
}

// 房源管理列表
export function goodsManageList(query) {
	return request({
		url: '/app/mall/goods/manage/list',
		method: 'get',
		params: query
	})
}

// 新增租房-发布房源
export function addGoods(data) {
	return request({
		url: '/app/mall/goods',
		method: 'post',
		data: data
	})
}

// 修改租房-发布房源
export function editGoods(data) {
	return request({
		url: '/app/mall/goods',
		method: 'put',
		data: data
	})
}

// 房源下架
export function goodsOffSelf(query) {
	return request({
		url: '/app/mall/goods/offShelf',
		method: 'get',
		params: query
	})
}

// 房源上架
export function goodsOnSelf(query) {
	return request({
		url: '/app/mall/goods/onShelf',
		method: 'get',
		params: query
	})
}

// 删除房源
export function goodsDelete(ids) {
	return request({
		url: '/app/mall/goods/' + ids,
		method: 'delete'
	})
}